import React, {Component} from 'react';
import {View, Text, TouchableOpacity, StyleSheet} from 'react-native';

export default class MyScreen extends Component {
  constructor(props) {
    super(props);
  }
  componentDidMount(){
    toast.message('My Page');
  }
  render() {
    return (
      <View>
        <TouchableOpacity
          style={styles.button}
          onPress={() => this.props.navigation.navigate('HomePage')}>
          <Text style={styles.buttonText}>My Page</Text>
        </TouchableOpacity>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  button: {
    width: 250,
    marginTop: 80,
    marginLeft: 50,
    minHeight: 46,
    paddingHorizontal: 15,
    paddingVertical: 6,
    borderStyle: 'solid',
    borderWidth: 1,
    borderRadius: 8,
    borderColor: '#ae9373',
    backgroundColor: '#f5f5f5',
    textAlign: 'center',
  },
  buttonText: {
    color: '#ae9373',
    fontSize: 20,
    lineHeight: 30,
    textAlign: 'center',
  },
});
